package com.yn.courseselectionsystem.service.impl;

import com.yn.courseselectionsystem.dao.UserDao;
import com.yn.courseselectionsystem.pojo.User;
import com.yn.courseselectionsystem.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @description: TODO
 * @author: Tokyo_God
 * @date: 2020/12/28 10:26
 * Role of:
 * @version: v1.0
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao;

    @Override
    public User selUserName(String name) {
        return userDao.selUserName(name);
    }

    @Override
    public User loginEmail(String email) {
        return userDao.loginEmail(email);
    }

    @Override
    public User loginUser(String name, String pwd) {
        return userDao.loginUser(name,pwd);
    }

    @Override
    public User selUserEmail(String email) {
        return userDao.selUserEmail(email);
    }

    @Override
    public int upPwd(String pwd,String email) {
        return userDao.upPwd(pwd,email);
    }

    @Override
    public int upUser(User user) {
        return userDao.upUser(user);
    }
}
